import config from "@/config"
import http from "@/utils/request"

export default {
	list: {
		url: `${config.API_URL}/user/dept/list`,
		name: "获取部门",
		post: async function (params) {
			return await http.post(this.url, params);
		}
	},
	create: {
		url: `${config.API_URL}/user/dept/create`,
		name: "新增部门",
		post: async function (params) {
			return await http.post(this.url, params);
		}
	},
	edit: {
		url: `${config.API_URL}/user/dept/edit`,
		name: "编辑部门",
		post: async function (params) {
			return await http.post(this.url, params);
		}
	},
	delete: {
		url: `${config.API_URL}/user/dept/delete`,
		name: "删除部门",
		post: async function (params) {
			return await http.post(this.url, params);
		}
	},

	deptMapping: {
		url: `${config.API_URL}/user/dept/deptMapping`,
		name: "部门映射省份",
		post: async function (params) {
			return await http.post(this.url, params);
		}
	},
	deptToProvince: {
		url: `${config.API_URL}/user/dept/deptToProvince`,
		name: "根据部门id查映射省份",
		post: async function (params) {
			return await http.post(this.url, params);
		}
	},
	deptQueryListByEmp: {
		url: `${config.API_URL}/user/dept/deptQueryListByEmp`,
		name: "部门列表",
		post: async function (params) {
			return await http.post(this.url, params);
		}
	}
}
